package com.resou.reader.data.local;

import android.content.Context;
import android.content.SharedPreferences;

public class PreferencesHelper {
    public static final String PREF_FILE_NAME = "android_resou_pref_file";
    private final SharedPreferences mPref;
    private static PreferencesHelper sInstance;

    public PreferencesHelper(Context context) {
        mPref = context.getSharedPreferences(PREF_FILE_NAME, Context.MODE_PRIVATE);
    }

    public static PreferencesHelper getInstance(Context context) {
        if (sInstance == null) {
            sInstance = new PreferencesHelper(context);
        }
        return sInstance;
    }

    public void clear() {
        mPref.edit().clear().apply();
    }


}
